package com.ssy.lingxi.product.entity.commodity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 商品审核记录实体类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/29
 */
@Getter
@Setter
@Entity
@Table(schema = "public", name = "product_commodity_check_record", indexes = {@Index(name = "product_commodity_check_record_member_role_id_idx", columnList = "memberRoleId"),
        @Index(name = "product_commodity_check_record_commodity_id_idx", columnList = "commodityId"),
        @Index(name = "product_commodity_check_record_create_time_idx", columnList = "createTime")})
public class CommodityCheckRecord implements Serializable {
    private static final long serialVersionUID = -7944069108588464075L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="commodity_check_record_seq")
    @SequenceGenerator(sequenceName="product_commodity_check_record_seq", name="commodity_check_record_seq",allocationSize = 1)
    private Long id;

    /**
     * 会员角色id
     */
    @Column(columnDefinition = "int", nullable = false)
    private Long memberRoleId;

    /**
     * 会员角色名称
     */
    @Column(columnDefinition = "varchar(20)", nullable = false)
    private String memberRoleName;

    /**
     * 审核状态: 1-待提交审核, 2-待审核, 3-审核不通过, 4-审核通过
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer status = 1;

    /**
     * 操作时间
     */
    @Column(columnDefinition = "int8")
    private Long createTime;

    /**
     * 操作: 1-新增, 2-修改， 3-审核
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer operation;

    /**
     * 审核意见
     */
    @Column(columnDefinition = "varchar(120)")
    private String checkRemark;

    /**
     * 商品id
     */
    @Column(columnDefinition = "int8", nullable = false)
    private Long commodityId;


}
